-
Notifications
You must be signed in to change notification settings - Fork 354
[clang][DependencyScanning] Check for the Existence of CIWithContext before Finalizing
#12029
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: stable/21.x
Are you sure you want to change the base?
[clang][DependencyScanning] Check for the Existence of CIWithContext before Finalizing
#12029
Conversation
|
Note to reviewers:
|
|
Please test with following PR: @swift-ci please test |
jansvoboda11
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense. I agree that we should make the API more ergonomic.
clang/lib/Tooling/DependencyScanning/DependencyScanningWorker.cpp
Outdated
Show resolved
Hide resolved
…xt instance that does not exist.
a8bf360 to
03f31d7
Compare
|
Please test with following PR: @swift-ci please test |
|
Please test with following PR: @swift-ci please test macOS. |
|
Please test with following PR: @swift-ci please test. |
The by-name lookup APIs are intended for Swift. swiftlang/swift#85555 teaches Swift to use it. The original intention was to invoke the
finalizationAPI explicitly. swiftlang/swift#85555 folds the finalization step into the module dependency scanner's destructor. This leads to a case where if an initialization error occurs, theCIWithContextmay not be setup for some workers, and calling the finalization API is incorrect.This PR checks against the existence of the
CIWithContextand then performs the finalization.